<template>
  <Button
    type="text"
    :disabled="disabled"
    :loading="loading"
    size="small"
    class="table-btn"
    :class="{ 'table-btn-error': type === 'error' }"
  >
    <slot></slot>
  </Button>
</template>

<script setup>
// 接受参数
const props = defineProps({
  disabled: {
    type: Boolean,
    default: false,
  },
  loading: {
    type: Boolean,
    default: false,
  },
  type: {
    type: String,
    default: '',
  },
})
</script>

<style lang="less" scoped>
.table-btn {
  color: #2d8cf0;
  height: 24px;
  line-height: 24px;
}

.table-btn-error {
  color: #f16643;
}
</style>
